import { MenuOption } from "naive-ui";
import { renderIcon } from "@/utils/renderComponent/iconRender";
import { DashboardOutlined } from "@vicons/antd";

export const menus: MenuOption[] = [
  {
    label: "Dashboard",
    key: "dashboard",
    path: "/dashboard",
    icon: renderIcon(DashboardOutlined),
    children: [
      {
        label: "分析页",
        path: "/dashboard/analysis",
        key: "analysis",
      },
      {
        label: "工作台",
        path: "/dashboard/work-bench",
        key: "workbench",
      },
    ],
  },

  {
    label: "My Task(工作台)",
    key: "my-task",
    path: "/my-task",
  },

  {
    label: "AIM（资产台账）",
    key: "assets-parameter",
    path: "/asset-management/assets-parameter",
  },

  {
    label: "SPM（备件管理）",
    key: "spare-parts-management",
    children: [
      {
        label: "备件基本信息管理",
        path: "/spare-parts-management/basic-information-management",
        key: "basic-information-management",
      },
      {
        label: "备件台账",
        path: "/spare-parts-management/ledger-management",
        key: "ledger-management",
      },
      {
        label: "备件盘点",
        path: "/spare-parts-management/inventory-management",
        key: "inventory-management",
      },
      {
        label: "备件入库管理",
        path: "/spare-parts-management/warehousing-management",
        key: "warehousing-management",
      },
      {
        label: "备件领用管理",
        path: "/spare-parts-management/requisition-management",
        key: "requisition-management",
      },
      {
        label: "备件退库管理",
        path: "/spare-parts-management/return-order-management",
        key: "return-management",
      },
    ],
  },

  {
    label: "PMM（预防性维护）",
    key: "pmm",
    children: [
      {
        label: "AM",
        path: "/pmm/am",
        key: "am",
      },
      {
        label: "TBM",
        path: "/pmm/tbm",
        key: "tbm",
      },
      {
        label: "PdM",
        path: "/pmm/pdm",
        key: "pdm",
      },
    ],
  },

  {
    label: "BMM（故障停机）",
    key: "fault-record",
    children: [
      {
        label: "故障记录管理",
        path: "/fault-record/fault-analysis",
        key: "fault-analysis",
      },
      {
        label: "改善清单管理",
        path: "/fault-record/improvement-receipt",
        key: "improvement-receipt",
      },
      {
        label: "故障记录分析",
        path: "/fault-record/fault-record-analysis",
        key: "fault-record-analysis",
      },
    ],
  },

  {
    label: "PTM（生产时间）",
    key: "ptm",
    path: "/ptm",
  },

  {
    label: "数据字典",
    key: "data-dictionary",
    children: [
      {
        label: "物料类别",
        path: "/data-dictionary/material-category",
        key: "data_dictionary_material_category",
      },
      {
        label: "部门",
        path: "/data-dictionary/department",
        key: "department",
      },
      {
        label: "生产线",
        path: "/data-dictionary/production-line",
        key: "production-line",
      },
      {
        label: "员工",
        path: "/data-dictionary/employee",
        key: "employee",
      },
      {
        label: "子设备",
        path: "/dictionary/sub-equipment",
        key: "sub-equipment",
      },
      {
        label: "备件库",
        path: "/dictionary/warehouse",
        key: "warehouse",
      },
      {
        label: "故障代码",
        path: "/fault-record/fault-code",
        key: "fault-code",
      },
      {
        label: "故障类型",
        path: "/fault-record/fault-type",
        key: "fault-type",
      },
    ],
  },
  {
    label: "系统维护",
    key: "system-management",
    children: [
      {
        label: "菜单权限管理",
        path: "/system/menu-permission-management",
        key: "menu-permission-management",
      },
      {
        label: "角色权限管理",
        path: "/system/role-permission-management",
        key: "role-permission-management",
      },
    ],
  },
];
